<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			input {
				display: inline-block;
				margin-left: 12px;
			}

			tr {
				width: 100%;
				border: 1px solid red;
			}

			td {
				width: 15px;
				height: 7px;
				border: 1px solid red;
			}
		</style>
	</head>
	<body>

		<table border="0">
			<input type="button" name="" value="行" />

			<input type="text" id="num1" value="" />

			<input type="button" name="" value="列" />

			<input type="text" id="mum2" value="" />

			<input type="button" id="btn" value="生成" />
			<tbody>


			</tbody>
		</table>
		<script type="text/javascript">
			btn.onclick = function() {

				var n1 = Number(num1.value);
				var n2 = Number(num2.value);
				for (i = 0; i < n1.length.value; i++) {
					var tr = document.createElement("tr");
					tbody.appendChild(tr);
					for (i = 0; j <= num2.length.value; j++) {
						var td = document.createComment("td");
						tr.appendChild(td);
						td.innerHTML = nun2[i].value;

					}
				}

			}
		</script>
	</body>
</html>
